package com.databaseManager;

import java.util.List;

public interface IdatabaseFunc {
    void insertRecord(String Rid, String Pid, String Eid, String Utime, String treat, String seeType, String onsetDate,
                      String drugHistory, String mainComplaint, String curMedicalHistory) throws Exception;
    void insertRecord(Object[] data) throws Exception;
    void insertRecord(Record r) throws Exception;
    void updateRecord(String Rid, String Utime, String treat, String onsetDate, String drugHistory, 
    				  String mainComplaint, String curMedicalHistory) throws Exception;
    void updateRecord(Object[] data) throws Exception;
    void updateRecord(Record r) throws Exception;
    
    void insertApply(String applyId, String Eid, String Pid, CheckFeature[] features) throws Exception;
    void insertApply(Object[] data, CheckFeature[] features) throws Exception;
    void insertApply(Checkment apply) throws Exception;
    void insertCheckment(String applyId, String cheId, char state, String checkTime, String condition, 
    					 String cheResult, String warning, int price) throws Exception;
    void insertCheckment(Object[] data) throws Exception;
    void insertCheckment(String applyId, CheckFeature cf) throws Exception;

    void insertPrescription(String prescribeId, String Eid, String Pid, PresFeature[] features) throws Exception;
    void insertPrescription(Object[] data, PresFeature[] features) throws Exception;
    void insertPrescription(Prescription prescription) throws Exception;
    void insertMedicine(String prescribeId, String MedId, char state, int consum, int price) throws Exception;
    void insertMedicine(Object[] data) throws Exception;
    void insertMedicine(String prescribeId, PresFeature cf) throws Exception;

    List<Record> selectRecords(String Pid) throws Exception;
    Record selectRecord(String Pid, String Rid) throws Exception;

    Medicine selectMedicine(String MedId) throws Exception;
    List<Medicine> selectMedicines(String MedName) throws Exception;

    void updatePrepare(String precrisbeId) throws Exception;
    void updateDistribute(String precrisbeId) throws Exception;
    void updateRepay(String precrisbeId) throws Exception;
    void updateState(Object[] data) throws Exception;

    Record findRecord(String Rid) throws Exception;
    List<Record> findHistoryRecords(String Pid) throws Exception;
    Patient findPatient(String Pid) throws Exception;
    Doctor findDoctor(String Eid) throws Exception;
    String findDepartment(String data, SqlOP op) throws Exception;
    Order findOrder(String pid) throws Exception;
    String findDepRegister(String pid) throws Exception;
    String findProRegister(String pid) throws Exception;
    QueueNumber findQueueNumber(long qid) throws Exception;

    void addPatient(String pid, String password, String pname, int page, String psex, String Pworktype, String Ptelphone, String Paddr) throws Exception;
    void addPatient(Object[] data) throws Exception;
    void addPatient(Patient p) throws Exception;

    List<Doctor> searchProfessorByDepName(String DepName) throws Exception;

    void insertDepOrder(Object[] data) throws Exception;
    void insertDepOrder(long prid, String pid, String depNo, String ptime) throws Exception;
    void insertDepOrder(DepOrder depOrder) throws Exception;

    void insertProOrder(Object[] data) throws Exception;
    void insertProOrder(long prid, String pid, String eid, String ptime) throws Exception;
    void insertProOrder(ProOrder proOrder) throws Exception;

    void insertLiveNum(long livenum, String pid, String data, SqlOP op) throws Exception;

    void insertQueueNumber(QueueNumber q) throws Exception;

}
